<template>
  <div id="app">
    <Header />
    <!-- 展示路由的位置 -->
    <router-view></router-view>
    <Footer v-show="!gotoShow" />
  </div>
</template>

<script>
import Header from "./components/Header";
import Footer from "./components/Footer";
import { mapActions } from "vuex";

export default {
  name: "App",
  components: {
    Header,
    Footer,
  },
  mounted() {
    this.getCategoryList();
  },
  computed: {
    gotoShow() {
      return this.$route.meta.footerIsShow;
    },
  },
  methods: {
    ...mapActions("home", ["getCategoryList"]),
  },
};
</script>

<style>
</style>
